// 高德地图POI类型配置
export const poiTypes = {
  all: {
    label: '全部',
    color: '#00ff88',
    icon: '●'
  },
  scenic: {
    label: '景点',
    color: '#ff6b6b',
    icon: '🏮'
  },
  monitor: {
    label: '监控',
    color: '#4ecdc4',
    icon: '📹',
    hasVideoPlayer: true, // 是否有视频播放功能
    videoConfig: {
      autoplay: false,
      controls: true,
      width: 480,
      height: 320
    }
  },
  entrance: {
    label: '出入口',
    color: '#45b7d1',
    icon: '🚪'
  },
  accommodation: {
    label: '住宿',
    color: '#96ceb4',
    icon: '🏨'
  },
  dining: {
    label: '餐饮',
    color: '#feca57',
    icon: '🍽️'
  },
  shopping: {
    label: '购物',
    color: '#ff9ff3',
    icon: '🛍️'
  },
  service: {
    label: '服务',
    color: '#a8e6cf',
    icon: '🛎️'
  },
  broadcast: {
    label: '广播',
    color: '#ff7f50',
    icon: '📢'
  },
  environment: {
    label: '环境监测',
    color: '#32cd32',
    icon: '🌱'
  }
}

// 获取POI类型信息
export const getPoiTypeInfo = (type) => {
  return poiTypes[type] || poiTypes.all
}

// 获取所有POI类型列表
export const getAllPoiTypes = () => {
  return Object.keys(poiTypes).filter(type => type !== 'all')
}

// 景区边界坐标（观音湖区域）
export const scenicBoundary = [
  [105.5456, 30.5123], // 西南角
  [105.6234, 30.5123], // 东南角
  [105.6234, 30.5567], // 东北角
  [105.5456, 30.5567], // 西北角
  [105.5456, 30.5123]  // 闭合
]

// 湖面区域坐标
export const lakeArea = [
  [105.5678, 30.5234],
  [105.6012, 30.5234], 
  [105.6012, 30.5456],
  [105.5834, 30.5478],
  [105.5678, 30.5456],
  [105.5678, 30.5234]
]

// 监控设备模拟视频源
export const monitorVideoSources = {
  'amap_poi_009': 'https://video-qn.ibaotu.com/01/36/62/41DpgcVGd.mp4',
  'amap_poi_010': 'https://video-qn.ibaotu.com/01/36/62/41DpgcVGd.mp4',
  'amap_poi_011': 'https://video-qn.ibaotu.com/01/36/62/41DpgcVGd.mp4',
  'amap_poi_012': 'https://video-qn.ibaotu.com/01/36/62/41DpgcVGd.mp4',
  'amap_poi_013': 'https://video-qn.ibaotu.com/01/36/62/41DpgcVGd.mp4',
  'amap_poi_014': 'https://video-qn.ibaotu.com/01/36/62/41DpgcVGd.mp4',
  'amap_poi_015': 'https://video-qn.ibaotu.com/01/36/62/41DpgcVGd.mp4',
  'amap_poi_016': 'https://video-qn.ibaotu.com/01/36/62/41DpgcVGd.mp4',
  'amap_poi_017': 'https://video-qn.ibaotu.com/01/36/62/41DpgcVGd.mp4',
  '19': 'https://video-qn.ibaotu.com/01/36/62/41DpgcVGd.mp4'
}

// 获取监控设备视频源
export const getMonitorVideoSource = (poiId) => {
  console.log('正在获取视频源，POI ID:', poiId); // 添加调试日志
  const videoSource = monitorVideoSources[poiId];
  console.log('找到的视频源:', videoSource); // 添加调试日志
  return videoSource || null;
} 